package com.fan.push;

import android.app.Application;

import com.fan.base.IComponentApplication;
import com.fan.base.util.Logger;
import com.fan.base.util.Tools;

/**
 * 推送PushApplication
 *
 * @author fan
 * @date Created in 2019-09-23
 */
public class PushApplication implements IComponentApplication {


    private static final String UMENG_APP_KEY = "5d8a28340cafb211c1000bdb";

    private static final String UMENG_APP_SECRET = "d70593447778eda4d0a89735ee9abb62";

    @Override
    public void init ( Application application ) {
        Tools.init( application );
        Logger.setEnable( BuildConfig.DEBUG );
        Logger.e( "推送PushApplication" );

//        UMConfigure.init( application, UMENG_APP_KEY, "Umeng", UMConfigure.DEVICE_TYPE_PHONE, UMENG_APP_SECRET );
//        //获取消息推送代理示例
//        PushAgent mPushAgent = PushAgent.getInstance( application );
//        //注册推送服务，每次调用register方法都会回调该接口
//        mPushAgent.register( new IUmengRegisterCallback() {
//
//            @Override
//            public void onSuccess ( String deviceToken ) {
//                //注册成功会返回deviceToken deviceToken是推送消息的唯一标志
//                Logger.e( "注册成功：deviceToken：-------->  " + deviceToken );
//            }
//
//            @Override
//            public void onFailure ( String s, String s1 ) {
//                Logger.e( "注册失败：-------->  " + "s:" + s + ",s1:" + s1 );
//            }
//        } );
    }

}
